.PHONY:ALL
ALL:httpSvr CGI
httpSvr:main.cc
	g++ $^ -o $@ /usr/local/lib/libredis++.a /usr/lib/x86_64-linux-gnu/libhiredis.a -std=c++17 -lpthread -lmysqlclient 
CGI:
	cd ./webroot/cgi;make;cd -

.PHONY:release
release:
	mkdir -p release
	cp httpSvr release
	cp webroot release -rf
	cd ./release/webroot/cgi;rm ./*.cc Makefile -rf;cd -
	
.PHONY:clean
clean:
	rm -f httpSvr
	rm -rf release
	cd ./webroot/cgi;make clean;cd -
